import axios from '@/api/fetch';
import SERVER from '@/api/server';

// 流失报警提醒主查询
// export const lossRemind = params =>axios.get(`${SERVER.DMSCLOUD_REPAIR}/customer/customerLoss/findAll`,{params});
export const getinsuranceList = params => axios.get(`${SERVER.DMSCLOUD_CUSTOMERREPAIR}/customer/lossRemind/findAll`, { params });
// 客户流失报警根据VIN回显基础的提醒信息 用于点击提醒页面回显信息的请求
export const queryRemindInfo = vin => axios.get(`${SERVER.DMSCLOUD_REPAIR}/customer/customerLoss/queryRemindInfo/${vin}`, {});

// 新增流失提醒记录
export const addRemind = params => axios.post(`${SERVER.DMSCLOUD_CUSTOMERREPAIR}/customer/lossRemind/addRemind`, params);

// 查询客户流失提醒记录DCRC
export const queryDCRC = params => axios.get(`${SERVER.DMSCLOUD_CUSTOMERREPAIR}/customer/lossRemind/queryDCRC/${params.ownerNo}/${params.vin}`, {});
// 查询客户流失提醒记录RemindRecord
export const queryRemindRecord = params => axios.get(`${SERVER.DMSCLOUD_CUSTOMERREPAIR}/customer/lossRemind/queryRemindRecord`, { params });
// 获取最新流失规则
export const getLostRuleInfo = params => axios.get(`${SERVER.DMSCLOUD_CUSTOMERREPAIR}/customerLoseMng/customerLoseRemind/getLostRuleInfo`, {params});
// 获取流失预警客户list
export const getWarningRemindList = params => axios.get(`${SERVER.DMSCLOUD_REPAIR}/customerLoseMng/customerLoseRemind/getWarningRemindList`, { params });
// 获取流失摇摆客户list
export const getSwingRemindList = params => axios.get(`${SERVER.DMSCLOUD_REPAIR}/customerLoseMng/customerLoseRemind/getSwingRemindList`, { params });
// 获取流失客户list
export const getLostRemindList = params => axios.get(`${SERVER.DMSCLOUD_REPAIR}/customerLoseMng/customerLoseRemind/getLostRemindList`, { params });
// 获取再次关怀客户list
export const getRemindAgainList = params => axios.get(`${SERVER.DMSCLOUD_REPAIR}/customerLoseMng/customerLoseRemind/getRemindAgainList`, { params });
// 获取返厂客户list
export const getReturnList = params => axios.get(`${SERVER.DMSCLOUD_REPAIR}/customerLoseMng/customerLoseRemind/getReturnList`, { params });
// 获取客户明细
export const getOwnerVehicle = ownerNo => axios.get(`${SERVER.DMSCLOUD_REPAIR}/brithdayRemind/getOwnerVehicle/${ownerNo}`, {});
// 保存关怀信息
export const saveRemind = params => axios.post(`${SERVER.DMSCLOUD_CUSTOMERREPAIR}/customerLoseMng/customerLoseRemind/saveRemind`, params);

// 流失提醒回访导出
export const LSexport1 = params => axios.get(`${SERVER.DMSCLOUD_REPAIR}/customerLoseMng/customerLoseRemind/getWarningRemindList/export/excal`, { params, responseType: 'arraybuffer' });

// 流失提醒回访导出
export const LSexport2 = params => axios.get(`${SERVER.DMSCLOUD_REPAIR}/customerLoseMng/customerLoseRemind/getSwingRemindList/export/excal`, { params, responseType: 'arraybuffer' });

// 流失提醒回访导出
export const LSexport3 = params => axios.get(`${SERVER.DMSCLOUD_REPAIR}/customerLoseMng/customerLoseRemind/getLostRemindList/export/excal`, { params, responseType: 'arraybuffer' });
